CC=gcc
CCFLAGS=-g -O0 -Wall -Wextra -Wno-unused
LIB=threadpkg1
EXE=main

threadpkg1: queue util 
	$(CC) $(CCFLAGS) -c uthread.c -o $(LIB).o

all: threadpkg1 
	$(CC) $(CCFLAGS) *.o main.c -o $(EXE)

util: 
	$(CC) $(CCFLAGS) -c util.c

linked: util 
	$(CC) $(CCFLAGS) -c linked.c

queue: linked util
	$(CC) $(CCFLAGS) -c queue.c


test: all 
	clear && ./$(EXE)

clean:
	rm -f $(EXE) *.o